#ifndef KPAR_H
#define KPAR_H
#include "ui_kpar.h"
#include "ui_general.h"
#include <kxmlguiwindow.h>
#include <QProcess>
#include <QDebug>
#include <string>
#include <qobject.h>
#include <kurl.h>
#include "QEvent"
#include "kapplication.h"
#include "QBool"
#include <QListWidgetItem>

class KparThread;

class  General: public QWidget, public Ui::General
{
public:
    General( QWidget *parent ) : QWidget( parent ) {
        setupUi( this );
    }
};


class Kpar : public KXmlGuiWindow{
    Q_OBJECT
public:
    Kpar(QWidget *parent = 0);
    ~Kpar();
    void openURL(KUrl url);
    QString file_name;
    void customEvent( QEvent *e );
    Ui::Kpar ui;

protected:
    void changeEvent(QEvent *e);
    void setupActions();
    bool loadPAR2Files( const QString& par2file );
    bool checkParity( const QString& par2file );
    bool repairFiles( const QString& par2file );
    void clear_gui();
    QPixmap p_info;
    QPixmap p_ok;
    QPixmap p_damaged;
    QPixmap p_error;
    QPixmap p_warning;

private:
    KparThread* thr;


private slots:
    void on_repair_Button_clicked();
    void on_check_Button_clicked();
    void slotConfig();
    void openFile();

};



#endif // KPAR_H
